package br.com.projeto.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;

import com.tbm.megasena.R;

public class MenuActivity extends BaseActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.menu);
		
		Button btnCadastrar = (Button) findViewById(R.id.cadastrar);
		btnCadastrar.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(MenuActivity.this, SavarJogoActivity.class));
			}
		});
		
		Button btnComparar = (Button) findViewById(R.id.comparar);
		btnComparar.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(MenuActivity.this, VerResultadosActivity.class));
			}
		});
		
		Button btnGerar = (Button) findViewById(R.id.gerar);
		btnGerar.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(MenuActivity.this, GerarNumerosActivity.class));
			}
		});
		
		Button btnSair = (Button) findViewById(R.id.sair);
		btnSair.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				onBackPressed();
			}
		});
	}
	
	@Override
	public void onBackPressed() {
		super.onBackPressed();
		finish();
	}
}